{% extends "generic/page.html" %}

{% import "macros/text.html" as text %}

{% set year_tooltip = "Année recherchée : entier" %}
{% set month_tooltip = "Mois recherché : entier" %}
{% set day_tooltip = "Jour recherché : entier" %}
{% set category_tooltip = "Catégorie recherchée : 'aliases', 'subnets', 'groups' ou 'all'" %}


{% block body %}

    <div class="container">
        <div class="">
            <article class="card mb-6">
                <header class="card-header"><p class="card-header-title">Hourly</p></header>
                <div class="card-content">
                    <section class="content">
                        <p class="subtitle">Crawls</p>
                        {{ text.link("api","latest","raw") }}
                    </section>
                    <section class="content">
                        <p class="subtitle">Deviant nodes</p>
                        {{ text.link("api","latest","deviant",text.arg("category",category_tooltip)) }}
                    </section>
                </div>
                <footer class="card-footer">
                    <p class="card-footer-item">This section presents the hourly aggregation of the continuous crawling.
                        Last hour is available to request.
                        </p>
                </footer>
            </article>

            <article class="card mb-6">
                <header class="card-header"><p class="card-header-title">Daily</p></header>
                <div class="card-content">
                    <section class="content">
                        <p class="subtitle">Crawls</p>
                        {{ text.link("api",text.arg("year", year_tooltip),text.arg("month",month_tooltip),text.arg("day", day_tooltip),"raw") }}
                    </section>
                    <section class="content">
                        <p class="subtitle">Deviant Nodes</p>
                        {{ text.link("api",text.arg("year",year_tooltip),text.arg("month",month_tooltip),text.arg("day",day_tooltip),"deviant",text.arg("category",category_tooltip)) }}
                    </section>
                </div>
                <footer class="card-footer">
                    <p class="card-footer-item">The crawls are aggreagated daily and can be requested for the specified date.</p>
                </footer>
            </article>

            <article class="card mb-6">
                <header class="card-header"><p class="card-header-title">History</p></header>
                <div class="card-content">
                    <section class="content">
                        {{ text.link("api","history") }}
                    </section>
                </div>
                <footer class="card-footer">
                    <p class="card-footer-item">Some statistics on the daily aggregation are stored to generate the figures of the home page.</p>
                </footer>
            </article>


        </div>
    </div>


{% endblock %}